import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        num: 10,
        welcome: {
            authName: '欢迎光临',
            id: 147,
            order: 1,
            path: '/welcome',
            children: [
                {
                    authName: 'Welcome',
                    id: 124,
                    order: 1,
                    path: 'welcome',
                    children: []
                }
            ]
        }
    },
    mutations: {
        welcome(status, payload) {
            // this.state.isLoginModel = payload
            payload.unshift(status.welcome)
        },
    }
})